package com.isoft.controller;

import com.isoft.common.Result;
import com.isoft.entity.SignIn;
import com.isoft.mapper.SingnInMapper;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class SignInController {
    @Autowired
    private SingnInMapper signInMapper;
    @PostMapping("/SignIn")
    public Result StartWork(@RequestBody SignIn signIn) {
        Integer WorkingState = signInMapper.insert(signIn);
        if(WorkingState == 1){
            return Result.success();
        }
        return Result.error("1","设备添加失败！");
    }
}
